<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			{{message}}
			<button @click="get">add</button>
			<my-component ref="abc"></my-component>
			<script type="text/xtemplate" id="child">
				<div>
					我是子组件里面的东西
				</div>
			</script>
		</div>
		<script src="js/vue2.5.js"></script>
		<script>
			var bus = new Vue();
			var vm = new Vue({
				el:'#app',
				data:{
					message : '1'	
				},
				components:{
					'my-component':{
						template: '#child'
					}
				},
				methods:{
					get:function(){
						console.log('111',this.$refs.abc.$el.innerText);
//						console.log('111',this.$children[0].$el.innerText);
					}
				}
			})
		</script>
	</body>
</html>
